from collections import Counter


class Solution:
    def areOccurrencesEqual(self, s: str) -> bool:
        return len(set(Counter(s).values())) == 1


if __name__ == "__main__":
    print(Solution().areOccurrencesEqual("abacbc"))  # True
    print(Solution().areOccurrencesEqual("aaabb"))  # False
